<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<style>
    .font-bold {
        font-size: 14px;
        margin: 20px 0;
    }

    tr {
        border: 1px solid #999
    }

    td {
        padding: 10px;
        border-right: 1px solid #999
    }
</style>
<body class="gray-bg">
<div class="row">
    <div class="col-sm-5">
        <div class="wrapper wrapper-content project-manager">
            <h3>单位名称：<label th:text="${trainInfo.enterpriseName}"></label></h3>

            <p class=" font-bold">
                <span><i class="fa fa-circle text-warning"></i>
                    申请状态：
                 <label th:if="${trainInfo.type==0}">草稿</label>
                                <label th:if="${trainInfo.type==1}">待审核</label>
                                <label th:if="${trainInfo.type==2}">审核通过</label>
                                <label th:if="${trainInfo.type==3}">审核不通过</label>
                </span>
            </p>
            <p class=" font-bold">
                <span><i class="fa fa-circle text-success"></i>
                    营业执照网络路径：<label th:text="${trainInfo.enterpriseFile}"></label>
                </span>
            </p>
            <p class=" font-bold">
                <span><i class="fa fa-circle text-success"></i>
                    企业地址：<img style="width: 200px" th:src="${trainInfo.enterpriseAddress}"/>
                </span>
            </p>
        </div>
    </div>
    <div class="col-sm-7">
        <div class="wrapper wrapper-content animated fadeInUp">
            <p class=" font-bold">
                <span><i class="fa fa-circle text-success"></i>
                    考评团队：
                      <input id="teamTxt" type="hidden" th:value=""/>
                </span>
            </p>
            <p class=" font-bold">
                <span><i class="fa fa-circle text-success"></i>
                    考评场地设备：
                       <input id="equipmentTxt" type="hidden" th:value=""/>
                      <table id="equipment"></table>
                </span>
            </p>
            <p class=" font-bold">
                <span><i class="fa fa-circle text-success"></i>
                    实习就业单位：
                     <input id="employerTxt" type="hidden" th:value=""/>
                      <table id="employer"></table>
                </span>
            </p>
            <p class=" font-bold">
                <span><i class="fa fa-circle text-success"></i>
                    创建人：<label th:text=""></label>
                </span>
            </p>
            <p class=" font-bold">
                <span><i class="fa fa-circle text-success"></i>
                        创建时间：<label
                            th:text="${trainInfo.createTime} eq null ? '' : ${#dates.format(trainInfo.createTime, 'yyyy-MM-dd HH:mm:ss')}"></label>
                </span>
            </p>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script>
    //考评团队
    getTeam();
    //考评场地设备
    getEquipment();
    //实习就业单位
    getEmployer();

    function getTeam() {
        var teamTxt = JSON.parse($("#teamTxt").val());
        var a = '<tr><td>序号</td><td>姓名</td><td>职称</td><td>职务</td><td>考评岗位</td><td>联系电话</td><td>备注</td></tr>';
        for (var i = 0; i < teamTxt.length; i++) {
            a += '<tr><td>' + parseInt(i + 1) + '</td><td>' + teamTxt[i].khName + '</td><td>' + teamTxt[i].jobName + '</td><td>' + teamTxt[i].position + '</td>' +
                '<td>' + teamTxt[i].kpPost + '</td><td>' + teamTxt[i].kpMobile + '</td><td>' + teamTxt[i].kpRemark + '</td></tr>'
        }
        $("#team").html(a)
    }

    // function getEquipment() {
    //     var equipmentTxt = JSON.parse($("#equipmentTxt").val());
    //     var a = '<tr><td>序号</td><td>场地</td><td>位置</td><td>设备及设施</td><td>说明</td></tr>';
    //     for (var i = 0; i < equipmentTxt.length; i++) {
    //         a += '<tr><td>' + parseInt(i + 1) + '</td><td>' + equipmentTxt[i].kpSite + '</td>' +
    //             '<td>' + equipmentTxt[i].college + '学院' + equipmentTxt[i].ridgepole + '栋' + equipmentTxt[i].classroomNum + '号</td>' +
    //             '<td>' + equipmentTxt[i].equiAndFacility + '</td><td>' + equipmentTxt[i].equiAndFacility + '</td></tr>'
    //     }
    //     $("#equipment").html(a)
    // }

    // function getEmployer() {
    //     var employerTxt = JSON.parse($("#employerTxt").val());
    //     var a = '<tr><td>序号</td><td>单位名称</td><td>单位负责人</td><td>联系电话</td><td>实习就业负责人</td><td>联系电话</td><td>拟招聘人数(人)</td><td>拟招聘岗位</td><td>薪酬(元)</td></tr>';
    //     for (var i = 0; i < employerTxt.length; i++) {
    //         a += '<tr><td>' + parseInt(i + 1) + '</td><td>' + employerTxt[i].dwName + '</td><td>' + employerTxt[i].dwUser + '</td><td>' + employerTxt[i].dwMobile + '</td>' +
    //             '<td>' + employerTxt[i].jyUser + '</td><td>' + employerTxt[i].jyMobile + '</td><td>' + employerTxt[i].zpNum + '</td>' +
    //             '<td>' + employerTxt[i].zpPost + '</td><td>' + employerTxt[i].emolument + '</td></tr>'
    //     }
    //     $("#employer").html(a)
    // }

</script>
</body>
</html>
